Skip to main content

Motor Insurance OCR API

API Description

Objective

The Motor Insurance OCR API extracts the textual data from an image of a motor insurance document and returns it in a JSON format. It includes:

  • Name of the Insured,
  • Chassis Number,
  • Engine Number,
  • Make,
  • Model,
  • Variant or Sub-Type or Body Type,
  • Hypothecated or Lease To or Financier,
  • Insured Declared Value(IDV),
  • Policy Start Date,
  • Policy End Date.
InputOutput
An image or PDF file containing a motor insurance documentThe textual information extracted from the document

API URL

https://ind-engine.thomas.hyperverge.co/v1/readMotorInsurance

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

API Request Details

Method - POST

Headers

ParameterMandatory or OptionalTypeDescriptionValid Values
content-type Mandatory string This parameter defines the media type for the request payload.multipart/form-data
appIdMandatorystringThe application ID shared by HyperVergeNot Applicable - this is a unique value.
appKeyMandatorystringThe application key shared by HyperVergeNot Applicable - this is a unique value.
transactionIdMandatorystringThe unique ID for the customer journey.Not Applicable - this is a unique value related to a transaction in your application.

Inputs

The following table provides the complete information on the parameters used in the request body for the API call.

Parameter Mandatory or Optional Description
image Mandatory The image file containing the motor insurance document.
Caution
  • If you send multiple files in the same API request, the OCR extraction will be performed only on one of the files. Kindly send only one file in a request to avoid confusion.
  • If the PDF file has multiple pages, only the first page will be considered for the OCR extraction.

Request Sample

The following code shows a standard curl request for the API.

curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/readMotorInsurance' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--form 'image=@"<path_to_image_file>"'

Document Sample

The following is a sample motor insurance document. motor_insurance_ocr_api

Success Response

The following is a successful response sample:

{
"status": "success",
"statusCode": 200,
"result": {
"details": {
"policyNumber": {
"value": "POL123456789",
"conf": 0.98
},
"policyHolderName": {
"value": "John Doe",
"conf": 0.95
},
"vehicleNumber": {
"value": "KA01AB1234",
"conf": 0.97
},
"policyStartDate": {
"value": "2023-01-01",
"conf": 0.96
},
"policyEndDate": {
"value": "2024-01-01",
"conf": 0.96
},
"premiumAmount": {
"value": "5000.00",
"conf": 0.95
}
}
},
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Success Response Details

ParameterTypeDescription
statusstringThe status of the request
statusCodeintegerThe HTTP status code returned for the request
resultobjectContains the extracted details from the motor insurance document
detailsobjectContains the extracted fields with their values and confidence scores
metaDataobjectContains request and transaction identifiers

Failure Response Sample

When the image is not of a motor insurance document, the JSON output might contain null or random values.

Error Response Sample

The following are the sample error responses for the API.

{
"status": "failure",
"statusCode": 400,
"error": "API call requires one input image",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Failure and Error Response Details

A failure or error response from the module contains a failure status, with a relevant status code and error message.
The following table lists all error responses:

Status CodeError MessageError Description
400No Image inputThe request missed the image input.
400image size cannot be greater than 6MBThe image size is larger than the allowed limit.
422Document Not DetectedThe image file in the request is not a valid motor insurance document.
5xxInternal Server ErrorThere was an error with HyperVerge's server. Please contact the HyperVerge team.
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: